package com.ptszyxx.popose.module.main.dynamic.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.ptszyxx.popose.R;
import com.ptszyxx.popose.databinding.ItemDynamicReplyBinding;
import com.ptszyxx.popose.module.main.dynamic.vm.DynamicReplyVM;
import com.ysg.http.data.entity.dynamic.ReplyEntity;

public class DynamicReplyAdapter extends BaseQuickAdapter<ReplyEntity, BaseDataBindingHolder<ItemDynamicReplyBinding>> {

    private DynamicReplyVM viewModel;
    private Presenter mPresenter = new Presenter();

    public DynamicReplyAdapter(DynamicReplyVM viewModel) {
        super(R.layout.item_dynamic_reply);
        this.viewModel = viewModel;
    }

    @Override
    protected void convert(BaseDataBindingHolder<ItemDynamicReplyBinding> holder, ReplyEntity item) {
        ItemDynamicReplyBinding binding = holder.getDataBinding();
        if (binding != null) {
            binding.setEntity(item);
            binding.setViewModel(viewModel);
            binding.setPresenter(mPresenter);
            binding.setPosition(holder.getBindingAdapterPosition());
            binding.executePendingBindings();
        }
    }

    public static class Presenter{
    }








}
